<HTML><HEAD><TITLE>current_struct(?Struct)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Obsolete</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>current_struct(?Struct)</H1>
Succeeds if Struct is a currently visible structure specification.


<DL>
<DT><EM>Struct</EM></DT>
<DD>Variable or structure.
</DD>
</DL>
<H3>This built-in predicate is obsolete!</H3>
<H2>Description</H2>
   Used to retrieve the definition of a defined structure, or to
   enumerate all visible structure definitions.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>current_struct(+) is semidet
<LI>current_struct(-) is nondet
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
There is no declared structure with Struct's functor
<H3>Exceptions</H3>
<DL>
<DT><EM>(5) type error </EM>
<DD>Struct is neither variable nor structure.
</DL>
<H2>Examples</H2>
<PRE>
    [eclipse 1]: local struct(employee(name,age,salary)).
    yes.

    [eclipse 2]: current_struct(employee(A,B,C)).
    A = name
    B = age
    C = salary
    yes.

    [eclipse 3]: Emp = employee{}, current_struct(Emp).
    Emp = employee(name, age, salary)
    yes.

    [eclipse 4]: current_struct(S).
    S = employee(name, age, salary)     More? (;) 
    S = suspend(inst, constrained, bound)
    yes.

Error:
   current_struct(a).             (Error 5).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/syntax/current_struct-2.html">current_struct / 2</A>, <A HREF="../../kernel/modules/local-1.html">local / 1</A>, <A HREF="../../kernel/syntax/struct-1.html">struct / 1</A>
</BODY></HTML>
